#pragma once
#include <stack>
#include <assert.h>
#include "global_config.h"

struct Chunk;

enum GraphicsWindow
{
	WINDOW_GAME,
	WINDOW_DEBUG
};

GLOBAL_CONSTANT int TEXTURE_COUNT = (10);
//GAME_GRAPHICS
SDL_Texture * graphics_load_texture(const char * path);
int graphics_load();
//renders the screen position of the entitys absolute world position
//void graphics_render_text(std::string msg);
void graphics_render_entity(V2i entitySize,V2i camera_position, V2 world_position ,int spriteID, int highlight_amount);
void graphics_render_entity_imediate(V2i entitySize,V2i camera_position, V2 world_position ,int spriteID, int highlight_amount);
void graphics_add_rect_to_stack(V2i pos, V2i size, Uint8 r, Uint8 g, Uint8 b, Uint8 a );
void graphics_add_screen_rect_to_stack(V2i pos, V2i size, Uint8 r, Uint8 g, Uint8 b, Uint8 a );
void graphics_render_stack( V2 cam_pos);
void graphics_render_tilemap(Chunk* chunk_arry[G::CHUNK_COUNT][G::CHUNK_COUNT], V2 cam_pos, bool showChunks);
void graphics_init(GraphicsWindow window);
void graphics_destroy(GraphicsWindow window);
void graphics_start_render(GraphicsWindow window);
void graphics_final_render(GraphicsWindow window);
void graphics_render_rect_outline_on_screen(SDL_Color col, V2 top_left_screen_space, V2i size);
void graphics_draw_string(SDL_Texture * string_texture, Rect bounds, GraphicsWindow window);
SDL_Texture * graphics_get_string_texture(SDL_Color c, std::string msg, GraphicsWindow window, int font_size);

